package exo5;

import java.util.ArrayList;
import java.util.List;

public class Abonne {
        private String nom;
        private String adresse;
        private List<Ouvrage> reservations;
        private List<Ouvrage> emprunts;
        
        public Abonne() {
                reservations = new ArrayList<Ouvrage>();                
                emprunts = new ArrayList<Ouvrage>();
        }
        
        public Abonne(String nom, String adresse, List<Ouvrage> resa,
                        List<Ouvrage> emprunt) {
                this.nom = nom;
                this.adresse = adresse;
                this.reservations = resa;
                this.emprunts = emprunt;
        }

        @Override
        public String toString() {
                StringBuffer etat = new StringBuffer();
                etat.append(this.nom).append("\nAdresse\t\t: ").append(this.adresse)
                                .append("\nRéservations\t: ").append(this.reservations)
                                .append("\nEmprunts\t: ").append(this.emprunts).append("\n");
                return etat.toString();
        }
}
